package com.sky.mapper.admin;

import com.sky.annotation.AutoFill;
import com.sky.enumeration.OperationType;
import com.sky.pojo.Category;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {

    List<Category> getByPage(String name, Integer type);

    @AutoFill(value = OperationType.UPDATE)
    Integer update(Category category);

    @AutoFill(value = OperationType.INSERT)
    Integer save(Category category);

    Integer delete(Long id);

    List<Category> getByType(Integer type);

    Category selectById(Long id);
}
